<template>
  <div class="realTimeDataCard">
    <div class="cardLeft">
      <h3>今日实时数据</h3>
      <p>全省数据</p>
      <ul>
        <template v-for="(item, index) in city">
          <li :class="index === currCityIndex ? 'active' : ''">{{ item }}</li>
        </template>
      </ul>
    </div>
    <div class="cardRight">
      <RingChart color="1, 187, 218" chartName="车辆总数"></RingChart>
      <RingChart color="227, 238, 110" chartName="今日上线"></RingChart>
      <RingChart color="204, 72, 47" chartName="今日报警"></RingChart>
    </div>
  </div>
</template>
<script lang="ts" setup>
import { ref, reactive } from 'vue';
import RingChart from './commonCharts/ringChart.vue';
const city = reactive([
  '杭州市',
  '宁波市',
  '温州市',
  '台州市',
  '丽水市',
  '衢州市',
  '金华市',
  '嘉兴市',
  '湖州市',
  '绍兴市',
  '舟山市',
]);
const currCityIndex = ref(0);
</script>
<style lang="scss" scoped>
.realTimeDataCard {
  position: absolute;
  bottom: 1px;
  left: 1px;
  width: 99.5%;
  height: 20%;
  border: 1px solid #23426b;
  background-color: rgba(37, 64, 106, 0.4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  .cardLeft {
    width: 45%;
    height: 100%;
    color: #fff;
    padding: 20px 40px;
    h3 {
      font-size: 22px;
      font-weight: 500;
    }
    p {
      font-size: 17px;
      margin-top: 10px;
    }
    ul {
      display: flex;
      flex-wrap: wrap;
      // justify-content: space-between;
      align-items: center;
      li {
        width: 33%;
        font-size: 15px;
        margin-top: 10px;
      }
      .active {
        color: #01dbe3;
      }
    }
  }
  .cardRight {
    width: 55%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 35px;
  }
}
</style>
